<template>
	<div class="front-padding categoryTemplate bg-white relative">
		<div class="tit">借款类别审批单</div>
		<div class="formTable">
			<el-row>
				<el-col :span="3">
					<div class="common">账套名</div>
				</el-col>
				<el-col :span="5">
                    <div class="common grayBackground">{{formData.accountSet}}</div>  
                </el-col>
                <el-col :span="3">
                    <div class="common">公司名字</div>
                </el-col>
                <el-col :span="13">
                    <div class="common grayBackground">{{formData.companyNameChinese}}</div>
                </el-col>
			</el-row>
			<el-row>
                <el-col :span="3">
                    <div class="common">行业</div>               
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.industryName}}</div>
                </el-col>
                <el-col :span="3">
                    <div class="common">注册号</div>
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.registrationNumber}}</div>
                </el-col>
                <el-col :span="3">
                    <div class="common">归属人</div>
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.belonger}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="3">
                    <div class="common">部门</div>               
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.deptName}}</div>
                </el-col>
                <el-col :span="3">
                    <div class="common">姓名</div>
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.empName}}</div>
                </el-col>
                <el-col :span="3">
                    <div class="common">职务</div>
                </el-col>
                <el-col :span="5">
                    <div class="common grayBackground">{{formData.posionName}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="3">
                    <div class="common">借款类别</div>               
                </el-col>
                <el-col :span="21">
                    <div class="common text-left">{{formData.loanCategory}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="3">
                    <div class="common">备注</div>               
                </el-col>
                <el-col :span="21">
                    <div class="common">{{formData.remark}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <div class="common"> 一级科目</div>               
                </el-col>
                <el-col :span="6">
                    <div class="common grayBackground">其他应收款</div>
                </el-col>
                <el-col :span="6">
                    <div class="common">二级科目</div>
                </el-col>
                <el-col :span="6">
                    <div class="common">{{formData.levelTwoSubjectName}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <div class="common">三级科目</div>               
                </el-col>
                <el-col :span="6">
                    <div class="common">{{formData.levelThreeSubjectName}}</div>
                </el-col>
                <el-col :span="6">
                    <div class="common">四级科目</div>
                </el-col>
                <el-col :span="6">
                    <div class="common">{{formData.levelFourSubjectName}}</div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="3">
                    <div class="common">审批人</div>               
                </el-col>
                <el-col :span="6">
                    <div class="common grayBackground">{{formData.approver}}</div>
                </el-col>
                <el-col :span="3">
                    <div class="common">审核意见</div>
                </el-col>
                <el-col :span="12">
                    <div class="common grayBackground">{{formData.approvalOpinion}}</div>
                </el-col>
            </el-row>
		</div>
		<div class="formTable-btn absolute">
			<el-button type="danger" size="small" @click="close">关闭</el-button>
		</div>
	</div>
</template>
<script>
export default {
	data() {
		return {
			formData: {},
            rowId: this.$store.state.borrowApproveOrderStore.rowId
		}
	},
	methods: {
        getData() {         //获取查看的单据数据
            this.$http.get('loanCategory/findLoanCategoryById?id=' + this.rowId).then(res => {
                if(res.data.code == 20001) {
                    if(res.data.data) {
                        this.formData = res.data.data;
                    }
                }
            });
        },
		close() {
			let index = parent.layer.getFrameIndex(window.name);    //先得到当前iframe层的索引
            parent.layer.close(index);
		}
	},
    mounted() {
        this.getData();
    }
}
</script>